<template>
  <el-row type="flex" justify="end" align="middle" style="margin-top: 15px">
      <el-pagination background layout="prev, pager, next"  :page-size="limit" :total="total" @current-change="handleCurrentChange">
      </el-pagination>
    </el-row>
</template>
<script>
export default {
  name: 'pagination',
  props: {
    total: {
      type: [Number, String],
      default: 0
    },
    limit: {
      type: Number,
      default: 10
    }
  },
  methods: {
    handleCurrentChange (currentPage) {
      this.$emit('onCurrentChange',currentPage)
    }
  }
}
</script>
<style lang="scss" scoped></style>
